package cn.org.xwb.bookmall.model.po;

import cn.org.xwb.bookmall.model.constant.ProductConst;
import cn.org.xwb.common.encrypt.annotation.rsa.RsaDe;
import cn.org.xwb.common.valid.annotation.str.StrMaxLen;
import cn.org.xwb.common.valid.annotation.str.StrNotNull;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author xwb
 * @since 2023-11-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("product_param")
public class ProductParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品 id
     */
    private Long productId;

    /**
     * 商品参数名称
     */
    @StrNotNull
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_PARAM_NAME_MAX_LEN)
    private String name;

    /**
     * 商品参数值
     */
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_PARAM_VAL_MAX_LEN)
    private String val;


}
